package com.itheima.service.impl;

import com.itheima.mapper.EmpLogMapper;
import com.itheima.pojo.EmpLog;
import com.itheima.service.EmpLogService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * 员工日志业务层
 * @author GY
 * @version V1.0
 * @date 2025-01-12 18:16
 */
@Service
@RequiredArgsConstructor
public class EmpLogServiceImpl implements EmpLogService {
    private final EmpLogMapper empLogMapper;

    @Transactional(rollbackFor = {Exception.class},propagation = Propagation.REQUIRES_NEW)
    @Override
    public void insertLog(EmpLog empLog) {
        empLogMapper.insert(empLog);
    }
}
